<?php

namespace app\controller\user\controller;

use app\service\DishService;
use app\support\ResponseHelper;
use DI\Attribute\Inject;
use Shayvmo\WebmanAnnotations\Annotations\GetMapping;
use Shayvmo\WebmanAnnotations\Annotations\RestController;
use support\Response;
use Webman\Http\Request;

#[RestController("/user/dish")]
class DishController
{
    #[Inject]
    protected  DishService $dishService;

    #[GetMapping("/list")]
    public function list(Request $request): Response
    {
        $category = $this->dishService->list($request->all());
        return ResponseHelper::successJson($category);
    }
}